/*
 * @Overview:   validate
 * @Author:     Zi_Jun
 * @Email:      zijun2030@163.com
 * @Date:       2020/12/8 11:23
 * @Mark:       //
 */

const is = (val: unknown, type: string): boolean => {
  return toString.call(val) === `[object ${type}]`;
};

export const isObject = (val: unknown): boolean => {
  return val !== null && is(val, 'Object');
};
